home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-22 | 1.6 KB | 70 lines | [TEXT/MPCC] |
- //
- // File: MacMain.c
- //
- // Contains: Simple Macintosh shell for testing QuickTime VR.
- //
- // Written by: Tim Monroe
- // Based (heavily!) on the MovieShell code written by Apple DTS
- //
- // Copyright: © 1994-1996 by Apple Computer, Inc., all rights reserved.
- //
- // Change History (most recent first):
- //
- // <2> 11/27/96 rtm conversion to personal coding style
- // <1> 12/20/94 khs first file
- //
- //
- // TODO: (1)
-
- // header files
- #include <stdio.h>
- #ifdef __MWERKS__
- #include <sioux.h>
- #endif // __MWERKS__
-
- #include "DTSQTUtilities.h"
- #include "MacFramework.h"
-
- //////////
- //
- // main
- // set up the app's execution environment; make sure QuickTime (etc.) is installed
- //
- //////////
-
- void main (void)
- {
- OSErr myErr = noErr;
-
- // this is for controlling the sioux window under Metrowerks (5.0 forward)
- #ifdef USESIOUX
- SIOUXSettings.initializeTB = false;
- SIOUXSettings.setupmenus = false;
- SIOUXSettings.autocloseonquit = true;
- #endif //USESIOUX
-
- InitStack(10*1024L); // add 10k more to the stack, for possible QD and Sound Manager needs
- InitMacEnvironment(10L); // 10 * MoreMasters
- InitMenubar();
-
- if (!QTUIsQuickTimeInstalled()) {
- ShowWarning("\pThe QuickTime extension is not present in this system", 0);
- ExitToShell();
- }
-
- #if powerc
- if (!QTUIsQuickTimeCFMInstalled()) {
- ShowWarning("\pThe QuickTime PowerPlug extension is not available (exit)", 0);
- ExitToShell();
- }
- #endif
-
- myErr = EnterMovies(); DebugAssert(myErr == noErr);
- if (myErr != noErr) {
- ShowWarning("\pCould not initialize the QuickTime environment (exit): ", myErr);
- ExitToShell();
- }
-
- MainEventLoop();
- }
-